<!DOCTYPE html>
<html>
<head>
 	<#include "/app/ued/mobilemindao/common/include_css.ftl">
    <title>主页</title>
	<style>
		#weui_tabbar_menu{position:fixed; bottom:0;left:0; width:100%;z-index:100;}
	</style>
</head>
<body>
	
 
	
	<div id="mindaoMainFrame">
 
	</div>
	

	
	<div class="weui_tabbar" id="weui_tabbar_menu">
	    <a id="homeTab" href="javascript:tabClick('homeTab')" url="<@context/>ued/mobilemindao/hello.do"  class="weui_tabbar_item">
	        <div class="weui_tabbar_icon">
	            <img src="<@context/>common/weui/example/images/icon_nav_button.png" alt="">
	        </div>
	        <p class="weui_tabbar_label">页面1</p>
	    </a>
 
 
	    
	    <a id="weuiTab" href="javascript:tabClick('weuiTab')" url="<@context/>ued/mobilemindao/weui.do"  class="weui_tabbar_item ">
	        <div class="weui_tabbar_icon">
	            <img src="<@context/>common/weui/example/images/icon_nav_cell.png" alt="">
	        </div>
	        <p class="weui_tabbar_label">微信UI</p>
	    </a>
	</div>
		
	<#include "/app/ued/mobilemindao/common/include_js.ftl">
	<script>
	    <#-- 
	    $(".weui_tabbar a").bind("click", function(){
	        //css操作
	        //操作导航栏
	        $(".weui_tab_bd_item_active").removeClass('weui_bar_item_on');
	        $(this).addClass("weui_bar_item_on");
	        tabClick($(this).attr("url"));
			
	        //操作内容切换
	        //$(".weui_tab_bd .weui_tab_bd_item_active").removeClass('weui_tab_bd_item_active').hide();
	        //var data_toggle =jQuery(this).attr("href");
	        //$(data_toggle).addClass("weui_tab_bd_item_active").show();
	    });
 		-->
		 var $obj=null;
		function tabClick(objId){
		    // alert(obj.id);
		     $obj=$("#"+objId);
		     
		      
 	        $(".weui_tab_bd_item_active").removeClass('weui_bar_item_on').removeClass('weui_tab_bd_item_active');
	        $obj.addClass("weui_bar_item_on").addClass('weui_tab_bd_item_active');
	      
	        mindaoNavigate($obj.attr("url"),null);
 
		  }
		   
		  function mindaoNavigate(url,data){
		     var connectFlag="&";
		     if (url.indexOf("?")<0){
		     	 connectFlag="?";
		     }
	    	 url=url+connectFlag+"_="+Math.random();
 			 
 			 var data=(data==null)?{}:data;
 			  
		     $.ajax({
				type: "POST",
				url: url,
				data: data,
				dataType:"html",//返回类型
				cache: false,
				success: function(html){
	 					
					 $("#mindaoMainFrame").html(html);
				}
			 });
			 
		    }
		     
	</script>
 
	
	
	
</body>
</html>
